import tushare as ts
import pandas as pd
from pyecharts.charts import Line
from pyecharts import options as opts
stock_info = ts.get_hist_data('600999')
stock_info.to_csv('600999.csv')
df = pd.read_csv('600999.csv',index_col = 0)
df.sort_index(inplace=True)
line = Line()
line.add_xaxis(df.index.to_list())
line.add_yaxis('Open',df.open.round(2).tolist())
line.add_yaxis('Close',df.close.round(2).to_list())
line.add_yaxis('High',df.close.round(2).to_list())
line.add_yaxis('low',df.close.round(2).to_list())
line.add_yaxis('',df.close.round(2).to_list())
line.add_yaxis('Volume',df.close.round(2).to_list())
line.set_global_opts(
		title_opts = opts.TitleOpts(title='600999'),
		tooltip_opts = opts.TooltipOpts(trigger = 'axis',axis_pointer_type = 'cross')
	)
line.render()
